<?PHP
session_start();
require("../config/connect.php");
require_once("../public/common.php");
require_once("../public/biaoqing.php");


$order = trim(CheckUrlParamNoDie("order"));
$id = trim(CheckUrlParamNoDie("id"));
$tag_encode = trim(CheckUrlParamNoDie("tag"));
$catelog_encode= trim(CheckUrlParamNoDie("cl"));
$searchKey_encode = CheckUrlParamNoDie("searchKey");
$tag = urldecode($tag_encode);
$catelog= urldecode($catelog_encode);
$searchKey = urldecode($searchKey_encode);
if ($searchKey != "")
	$tag = $searchKey;
	
if ($order=="")
	$order = $tag=="" && $catelog=="" ? "w" : "h";

//
$seoKey = "";
if ($tag != "")
	$seoKey = $tag;
else if ($catelog != "")
	$seoKey = $catelog;
else
	$seoKey = "时尚女装";

//$g_userid="";
$sql = "select * from goods_items where id='$id' limit 1";
$result = mysql_query( $sql );
$row = mysql_fetch_assoc( $result );
$g_tag=trim($row["tag"]);
$g_userid=$row["user_id"];

$desc = "";
if ($tag!="")
{
	$sql = "select * from tag_desc where name='$tag' limit 1";
	$result = mysql_query( $sql );
	if (mysql_num_rows($result) > 0)
	{
		$row = mysql_fetch_assoc( $result );
		$desc = $row["desc"];
		mysql_query( "update tag_desc set hits=hits+1 where name='$tag'" );
	}
	else
	{
		mysql_query( "insert into tag_desc (name,hits) values ('$tag', 1)" );
	}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="<?PHP echo $seoKey;?>,<?PHP echo $seoKey;?>搭配,<?PHP echo $seoKey;?>价格,秋季<?PHP echo $seoKey;?>,<?PHP echo $seoKey;?>秋装,<?PHP echo $seoKey;?>品牌,<?PHP echo $seoKey;?>单品推荐,秋季女装" /> 
<meta name="description" content="【<?PHP echo $seoKey;?>】兔丝街<?PHP echo $seoKey;?>频道为你提供<?PHP echo $seoKey;?>介绍，<?PHP echo $seoKey;?>服饰价格,精美<?PHP echo $seoKey;?>图片,还有爱逛街的MM精心挑选的<?PHP echo $seoKey;?>品牌" />
<meta name="robots" content="index, follow" /> 
<meta name="googlebot" content="index, follow" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> 
<title><?PHP echo $seoKey;?> - <?PHP echo $seoKey;?>单品，<?PHP echo $seoKey;?>品牌，<?PHP echo $seoKey;?>服饰搭配购买 - 兔丝街</title> 
<link type="text/css" rel="stylesheet" href="../css/base.css" />
<link type="text/css" rel="stylesheet" href="../css/shopping_street=20110716.css" />
<script language="javascript" src="../js/common.js"></script>
</head>
<body class="BabyStreet">
<div id="wrapper">
	<!---head kaishi--->
     <?php
     	include("../dialog.php");
		include("../headtop.php"); 
	?>
    <!-----head 结束----->
    
    <!----推荐商品 一 二 三级分类导航---->
     <?php
	 	$cl_catelog = $catelog;
		$cl_tag = $tag;
		include("../goods.php"); 
	?>
    <!----推荐商品 导航结束---->
    <div id="main">
    	<div class="grid_12">
            <!-----标题 24小时最热 最新 最热------->
            <div class="goodsTitle mt14">
                <ul class="">
                	<?PHP
					if ($tag!="" )
						echo "<h2>$tag</h2>";
					else if($catelog!="")
						echo "<h2>$catelog</h2>";
					?>
<?PHP if($tag=="" && $catelog=="") { ?>
                    <li <?php if ($order == "w") echo "class='active'"; ?> ><a href="?cl=<?php echo urlencode($catelog); ?>&tag=<?PHP echo urlencode($tag); ?>&order=w">7天最热</a></li>
                    <li <?php if ($order == "m") echo "class='active'"; ?> ><a href="?cl=<?php echo urlencode($catelog); ?>&tag=<?PHP echo urlencode($tag); ?>&order=m">30天最热</a></li>
<?PHP } else { ?>
					<li <?php if ($order == "h") echo "class='active'"; ?> ><a href="?cl=<?php echo urlencode($catelog); ?>&tag=<?PHP echo urlencode($tag); ?>&order=h">最热分享</a></li>
<?PHP } ?>
					<li <?php if ($order == "n") echo "class='active'"; ?> ><a href="?cl=<?php echo urlencode($catelog); ?>&tag=<?PHP echo urlencode($tag); ?>&order=n">最新分享</a></li>
                </ul>
            </div> 
            <!-----推荐内容------->
           <div>
                 <?PHP
				  $il_col = 4;
				  $il_tag = $tag;
				  $il_catelog=$catelog;
				  $il_param="&cl=".urlencode($catelog)."&tag=".urlencode($tag)."&order=$order";
				  $il_order=$order;
				  $il_IsSearch = $searchKey != "" ? 1 : 0;
				  require("../itemlist.php"); 
				  ?>
            	</div>
            <!---推荐内容 结束----->
        </div>
    </div>
</div>

<!---网尾 kaishi--->
 <?php
     include("../networkend.php"); 
?>
<?php
     include("../scrolltop.php"); 
?>
</body>
</html>

<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F22b7662ec7d02c816ddfd8f6df6e5cea' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-20984072-3']);
  _gaq.push(['_trackPageview']);
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>
